package com.atguigu.spring5.aopxml;

import org.aspectj.lang.ProceedingJoinPoint;

public class BookProxy {


    public void before() {//前置通知
        System.out.println("前置通知 before......");
    }

    public void afterThrowing() {//前置通知
        System.out.println("异常通知 afterThrowing......");
    }

    public void around(ProceedingJoinPoint proceedingJoinPoint) throws Throwable {//前置通知
        System.out.println("环绕通知 around环绕之前......");
        // 执行被增强的方法
        proceedingJoinPoint.proceed();
        System.out.println("环绕通知 around环绕之后......");
    }


    public void after() {//前置通知
        System.out.println("最终通知 after......");
    }

    public void afterReturning() {//前置通知
        System.out.println("后置通知 afterReturning......");
    }


}
